<h2><%=h 'New tag'.t %></h2>

<%= error_messages_for :tag %>

<p><%=h "Once you have created the tag, the attributes that are particular for that tag category will be available for editing".t %></p>

<%- form_for :tag, @tag, :url => { :action => "create" }  do |f| -%>
  <dl>
    <dt><%= f.label :name, 'Name'.t %></dt>
    <dd><%= f.text_field :name %></dd>

    <dt><%= f.label :canonical, 'Canonical'.t %></dt>
    <dd><%= f.check_box :canonical %></dd>

    <dt><%=h 'Category'.t %></dt>
    <dd>
      <%- if logged_in_as_admin? -%>
        <%- types = Tag::TYPES  -%>
      <%- else -%>
        <%- types = Tag::USER_DEFINED -%>
      <%- end -%>
      <%- types.each do |type| -%>
        <%= f.radio_button("type", type) %><%= f.label("type_#{type.downcase}", type) %><br/>
      <%- end -%>
    </dd>
  </dl>

<p class="submit">
<%= f.submit %></p>
<%- end -%>

<%= tag_wrangler_footer %>

